package com.jh.paymentchannel.repository;

import com.jh.paymentchannel.pojo.SDJBindCard;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface SDJBindCardRepository extends JpaRepository<SDJBindCard, Long>,JpaSpecificationExecutor<SDJBindCard>{

	SDJBindCard findByUserIdAndBankCard(String userid, String bankCard);
	
	//注销用户记录
	@Modifying
	@Query("delete from SDJBindCard sDJBindCard where sDJBindCard.userId=:userid")
	void delSDJBindCardByUserid(@Param("userid") String userid);
}
